-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable DH in generate_psa_tests.py #7909
Enable DH in generate_psa_tests.py #7909
Conversation
|
||
def test_cases_for_not_supported(self) -> Iterator[test_case.TestCase]: | ||
"""Generate test cases that exercise the creation of keys of unsupported types.""" | ||
for key_type in sorted(self.constructors.key_types): | ||
if key_type in self.ECC_KEY_TYPES: | ||
continue | ||
if key_type in self.DH_KEY_TYPES: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: this could be done in one line with the previous if.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer separate lines. This way you can set a breakpoint on just one of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good comparing to the way ECC_KEY_TYPES
are handled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor issues. Also I haven't ensured that test_suite_psa_crypto_not_supported.generated.data
looks right because of #7915.
CI is not happy. |
d4bd05c
to
a1f14f2
Compare
Just pushed a new version that I think fixes #7915. It won't pass CI yet as |
That means in |
CI came green, and the number of test cases that are never executed is down to something more reasonable - in particular, the list does not include any test from any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4325774 looks good to me, but now generate_psa_tests.py
no longer needs the MBEDTLS_GENPRIME
insertion hack.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
- RSA was missing the MBEDTLS_ prefix. - DH needs the same temporary fix (prefix + suffix) for now. - hack_dependencies_not_implemented() needs to ignore MBEDTLS_PSA_WANT dependencies. While at it, make the code currently used for ECC more generic, so that it's ready to be used for RSA and DH in the near future. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
d0daaee
to
182eb15
Compare
Indeed, it became unnecessary 15h ago when #7902 was merged. I've rebased to fix the conflict and remove the last commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, except for wrong dependencies in test_suite_psa_crypto_not_supported.generated.data
which is a pre-existing issue that will be resolved with #7915.
Well, I did try to resolve #7915 with this PR (as noted in the PR description), specifically this commit (whose message is out-of-date after rebasing btw). What did I miss? |
Oops, I missed that. Well, #7915 is not resolved, but I think the current state is good to merge anyway as long as we don't close the issue. Observation:
Comparing the output on development and this PR:
Resolving 7915 would mean that the DH tests pass here, and also the ECC test cases for curves that are not supported in development pass here. But they're still skipped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
Description
Resolves #7812: add support for DH keys to
generate_psa_tests.py
.PR checklist